//
// Created by 廖海龙 on 2025/4/15.
//

#ifndef HELLOVIDEOCACHE_HELLOHEADER_HPP
#define HELLOVIDEOCACHE_HELLOHEADER_HPP

#include <string>
#include <unordered_map>

#include "../cache/HelloRange.hpp"


/**
 * Author: liaohailong
 * Date: 2025/4/15
 * Time: 16:06
 * Description:
 **/
namespace HelloHeader
{

    std::string toLower(const std::string &str);

    std::string buildQueryString(const std::unordered_map<std::string, std::string> &_headers);

    bool endsWith(const std::string &str, const std::string &suffix);

    bool isDigits(const std::string &str);

    std::string getResponseHeader(const std::shared_ptr<HelloRange> &range,
                                  int64_t contentLength, const std::string &type);

    std::string trim(const std::string &s);
}


#endif //HELLOVIDEOCACHE_HELLOHEADER_HPP
